<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="Keywords" content="">
	<meta name="description" content="">
	<link rel="shortcut icon" type="image/x-icon" href="/static/images/favicon.ico">
	<!--公共部分-->
	<link href="/static/member/css/layout.css" type="text/css" rel="stylesheet" />
	<script src="/static/public/jquery-1.11.1.min.js" type="text/javascript"></script>
	<!--私有部分-->
	<link href="/static/member/css/default.style.css" type="text/css" rel="stylesheet" />
	<script src="/static/member/js/default.common.js" type="text/javascript"></script>
	<script src="/static/member/js/plugin.js" type="text/javascript"></script>

	<title>注册-德安信会计在线教育平台</title>
	<script>
		$(function () {

			$("#btn_submit").click(function () {
				$("form").submit();
			})
		})
	</script>
</head>
<body>
<div class="wrap">
	<!--star header-->
	<div class="registerMain">
		<div class="mt">
			<span class="iLogo">
				<a href="http://www.deanxin.com"><img height="50px;" src="/static/images/logo.gif">
			</a>
			</span>
			<span class="info">
                    	<span class="c-2aa5df"></span>
						<span class="r">已开注册，马上<a class="c-2aa5df p-l30" href="/login">登录</a></span>
                    </span>
		</div>
	</div>
	<!--end  header-->
	<!--star main-->
	<div class="wrap_main">
		<!--content star-->
		<div class="col_main">

			<!--star-->
			<div class="box_item LH30" style="padding:0 100px">
				<form action="/reg" method="post">
				<!--star账号信息-->
				<div class="txTableForm" style="padding:0px 0px 20px 200px; ">
					<div class="LH30 p-tb10">
						<!--<h1 class="fs24"><span class="c-fb9608">账号信息</span></h1>-->
					</div>
					<ul>
						<li class="<{if isset($phone_err)}>layError<{/if}>">
							<div class="tit fs14">手机号</div>
							<div class="cot ir">
								<input class="text" type="text" name="phone" id="phone" maxlength="11" value="<{if isset($phone)}><{$phone}><{/if}>" placeholder="手机号作为登录账号">
								<a href="javascript:;" class="hq_code send-msg" hasclick="1">获取验证码</a>
							</div>
							<{if isset($phone_err)}><label class="icoWrong"></label><{/if}>
						</li>
						<li class="<{if isset($vcode_err)}>layError<{/if}>">
							<div class="tit fs14">验证码</div>
							<div class="cot">
								<input class="text" type="text" maxlength="4" name="vcode" value="" placeholder="请输入6位数验证码">
							</div>
							<{if isset($vcode_err)}>
							<label class="icoWrong"></label>
							<{/if}>
						</li>

						<li id="pwd_li">
							<div class="tit fs14">登录密码</div>
							<div class="cot">
								<input class="text" type="password" maxlength="11" name="password" value="" placeholder="请设置6-12位登录密码">
							</div>
						</li>

					</ul>
				</div>
				<!--end账号信息-->
				</form>
			</div>
			<!--end-->

		</div>
		<!--content end-->
		<!--<div class="c oh h20"></div>-->
		<div class="itt_btn LH50 p-tb30 tac">
			<a class="u3 p-lr30" style="padding:0 100px;" href="javascript:;" id="btn_submit">注册</a>
		</div>
		<div style="height:70px; clear:both; overflow:hidden;"></div>
	</div>


	<!--end  main-->

	<!--star  footer-->
	<div class="registerMain">
		<div class="mdfooter">
			德安信会计在线教育平台 deanxin.com
		</div>
	</div>
	<!--end  footer-->
</div>
<script type="text/javascript">
	$(function ($) {
		var countdown = 5;
		//发送短信验证码
		$(".send-msg").click(function(){
			var obj = $(this);
			var linkPhone = $("#phone").val();
			if(linkPhone==""){
				alert("请填写手机号");
				$("#phone").focus();
				return;
			}else{
				var hasClick = $(obj).attr("hasclick");
				if (hasClick == 1) {
//                    alert("开始获取验证码");
					countdown = 60;
					$.ajax({
						url:"/reg/reg_msg/"+linkPhone,
						type:"post",
						dataType:"json",
						success:function(res){
							if(res.code==201){
								$("#pwd_li").remove();
								settime(obj);
							} else if (res.code == 200) {
								settime(obj);
							}else{
								alert(res.msg);
							}
						}
					});
				}
			}

		});


		function settime(val) {
			if (countdown == 0) {
				//                $(val).removeAttribute("disabled");
				$(val).attr("hasclick", "1");
				$(val).text("免费获取验证码");
			} else {
				$(val).attr("hasclick", "0");
				//                $(val).("disabled", true);
				$(val).text("重新发送(" + countdown + ")");
				countdown--;
				setTimeout(function () {
					settime(val)
				}, 1000);
			}
		}

	});
</script>
</body>
</html>
